<template>
  <div class="opacity">
    <V-CommonHeaderLeft>
      <div id="app">
        <el-row>
          <!-- 头部 -->
          <div class="header">
            <el-col :span="3" class="header-nav">
              <router-link to="/">首页&nbsp;&nbsp;/</router-link>
              <router-link to="/">应用&nbsp;&nbsp;/</router-link>
              <router-link to="/">商品库</router-link>
            </el-col>
            <el-col :span="1" :offset="20">
              <img src alt class="shuImg">
            </el-col>
          </div>
        </el-row>
        <div class="contents">
          <div class="contents-header">
            <h3>|商品库说明</h3>
            <p>通过商品库，您可以</p>
            <p>1、把商品资料快速同步给下游客户，赋能下游客户；</p>
            <p>2、让您的企业得到更多曝光获得知名度；</p>
          </div>
          <div class="contents-center">
            <h3>|商品库设置</h3>
            <div class="redio">
              <el-radio v-model="radio" label="1" @click.native='hiddenChecked()'>不共享</el-radio>
              <el-radio v-model="radio" label="2" @click.native='hiddenChecked()' class="redioTwo">共享给全部客户</el-radio>
              <el-radio v-model="radio" label="3" @click.native='blockChecked()'>共享给指定客户</el-radio>
            </div>
          </div>
          <div class="contents-footer">
            <div class="ceontents-footer-last" v-show="showChecked">
              <p @click="blockInvit()">邀请客户使用</p>
              <el-row class="perRow">
                <el-col :span="1">序号</el-col>
                <el-col :span="9">姓名</el-col>
                <el-col :span="6">序号</el-col>
                <el-col :span="6">序号</el-col>
                <el-col :span="2">操作</el-col>
              </el-row>
              <el-row class="perRow2">
                <el-col @click.native="addPer()">+添加客户</el-col>
              </el-row>
            </div>
          </div>
          <div class="tanPer" v-show="showPer">
            <div class="tanPer-header">
              <h3 @click="addPer()">添加客户</h3>
              <p @click="hiddenPer()">X</p>
            </div>
            <div class="tanPer-center">
              <p>请输入客户注册云上订货使用的手机号码</p>
              <input type="search" placeholder="请输入客户手机号码">
            </div>
            <div class="footer">
              <button @click="hiddenPer()">取消</button>
            </div>
          </div>
          <div class="tanInvit" v-show="showInvit">
            <div class="tanInvit-header">
              <h3>邀请客户使用系统</h3>
              <p @click="hiddenInvit()">X</p>
            </div>
            <div class="tanInvit-center">
              <img :src="url" class="img-circle">
              <a :href="url" download class="down">扫一扫推荐云上订货给客户</a>
            </div>
            <div class="tanInvit-footer">
              <button @click="hiddenInvit()">确定</button>
            </div>
          </div>
        </div>
        <div class="footer2">
          <button>保存</button>
        </div>
      </div>
    </V-CommonHeaderLeft>
  </div>
</template>

<script>
import VCommonHeaderLeft from './../common/vCommonHeaderLeft/VCommonHeaderLeft'
export default {
  components: {
    VCommonHeaderLeft
  },
  data () {
    return {
      radio: '2',
      showPer: false,
      url: require('./../../../static/images/goodser.png'),
      showInvit: false,
      showChecked: false
    }
  },
  methods: {
    addPer () {
      this.showPer = true
    },
    hiddenPer () {
      this.showPer = false
    },
    hiddenInvit () {
      this.showInvit = false
    },
    blockInvit () {
      this.showInvit = true
    },
    blockChecked () {
      this.showChecked = true
    },
    hiddenChecked () {
      this.showChecked = false
    }
  }
}
</script>

<style lang="scss" scoped>
#app {
  width: 100%;
  background-color: #f2f5f7;
  height: 100%;
  padding: 15px 10px 0px 10px;
}
.header {
  height: 45px;
  .header-nav {
    line-height: 30px;
    font-size: 12px;
    display: flex;
    justify-content: space-around;
    padding-left: 10px;
    span {
      display: inline-block;
      margin-left: 10px;
    }
    a {
      color: #999999;
    }
    a:hover {
      color: #20ade5;
    }
  }
  .header-img {
    width: 25px;
    height: 25px;
    border-radius: 5px;
    border: 1px solid #dce4e7;
  }
}
.header-nav a:nth-child(3) {
  color: #333;
}
.header-nav a:nth-child(3):hover {
  color: #333;
}
.shuImg {
  width: 20px;
  height: 20px;
  border: 1px solid;
}
.contents {
  padding: 50px 10px 0px 10px;
  background-color: #fff;
  height: 420px;
  overflow-x: hidden;
  overflow-y: scroll;
}
.contents-header > h3 {
  font-size: 16px;
  width: 100%;
  border-bottom: 1px solid #e3e3e3;
  padding-bottom: 10px;
  margin-bottom: 30px;
}
.contents-header > p {
  font-size: 14px;
  line-height: 25px;
}
.contents-center > h3 {
  font-size: 16px;
  width: 100%;
  border-bottom: 1px solid #e3e3e3;
  padding-bottom: 10px;
  margin: 50px 0px 20px 0px;
}
.redio {
  display: flex;
  flex-direction: column;
}
.redioTwo {
  margin: 15px 0px;
}
.contents-footer {
  padding-bottom: 20px;
}
.ceontents-footer-last > p {
  margin-left: 92%;
  color: #20ade5;
  font-size: 12px;
  cursor: pointer;
}
.perRow {
  height: 50px;
  line-height: 50px;
  font-size: 12px;
  background-color: #fcfcfc;
  border: 1px solid #e3e3e3;
  margin-top: 20px;
  color: #666666;
  text-align: center;
}
.perRow2 {
  height: 50px;
  border: 1px solid #e3e3e3;
  border-top: 0;
  font-size: 12px;
  color: #20ade5;
  cursor: pointer;
  text-align: center;
  line-height: 50px;
}
.tanPer {
  height: 450px;
  width: 600px;
  border: 1px solid;
  position: absolute;
  top: 100px;
  left: 300px;
  background-color: #fff;
}
.tanPer-header {
  display: flex;
  height: 50px;
  width: 100%;
  background-color: #f5f5f5;
  border-bottom: 1px solid #e3e3e3;
  line-height: 50px;
}
.tanPer-header > h3 {
  font-size: 16px;
  font-weight: normal;
  margin-left: 40%;
}
.tanPer-header > p {
  margin-left: 45%;
  color: #838383;
  cursor: pointer;
}
.tanPer-center > p {
  color: #999999;
  font-size: 12px;
  margin: 20px 0px 15px 20px;
}
.tanPer-center > input {
  width: 570px;
  height: 30px;
  border: 1px solid #e3e3e3;
  text-indent: 1em;
  margin-left: 20px;
}
.tanPer-center > input::placeholder {
  font-size: 12px;
  color: #999;
}
.footer {
  height: 50px;
  border-top: 1px solid #e3e3e3;
  margin-top: 270px;
}
.footer > button {
  width: 70px;
  height: 30px;
  border: 1px solid #20ade5;
  font-size: 12px;
  color: #20ade5;
  background-color: #fff;
  margin: 10px 0px 0px 85%;
  cursor: pointer;
}
.tanInvit {
  width: 600px;
  height: 415px;
  border: 1px solid;
  position: absolute;
  top: 100px;
  left: 300px;
  background-color: #fff;
}
.tanInvit-header {
  display: flex;
  height: 50px;
  width: 100%;
  background-color: #f5f5f5;
  border-bottom: 1px solid #e3e3e3;
  line-height: 50px;
}
.tanInvit-header > h3 {
  font-size: 16px;
  font-weight: normal;
  margin-left: 40%;
}
.tanInvit-header > p {
  margin-left: 33%;
  color: #838383;
  cursor: pointer;
}
.tanInvit-center {
  text-align: center;
  margin-top: 100px;
}
.img-circle {
  width: 125px;
  height: 125px;
  margin: 0 auto;
}
.down {
  color: #999999;
  font-size: 12px;
  margin-top: 10px;
  display: block;
}
.tanInvit-footer {
  height: 50px;
  border-top: 1px solid #e3e3e3;
  margin-top: 60px;
}

.tanInvit-footer > button {
  width: 70px;
  height: 30px;
  border: 1px solid #20ade5;
  font-size: 12px;
  color: #fff;
  background-color: #20ade5;
  margin: 10px 0px 0px 85%;
  cursor: pointer;
  border-radius: 5px;
}
.footer2 {
  width: 100%;
  height: 60px;
  background-color: #fff;
  border-top: 1px solid #e3e3e3;
}
.footer2 > button {
  width: 145px;
  height: 45px;
  border: 0;
  background-color: #20ade5;
  color: #fff;
  font-size: 14px;
  text-align: center;
  line-height: 45px;
  margin:10px 0px 0px 85%;
  border-radius: 5px;
}
</style>
